package com.kelvem.saas.workbanch.core.manager.dao;

import com.kelvem.saas.workbanch.fsm.anno.entity.RegisterDao;
import com.kelvem.saas.workbanch.fsm.dao.BaseDao;
import com.kelvem.saas.workbanch.core.manager.model.MetaTableColumnEntity;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * 实体表字段Dao
 *
 * @author kelvem
 * @version 1.0
 */
@Mapper
@RegisterDao(entityClass= MetaTableColumnEntity.class)
@Repository
public interface MetaTableColumnDao extends BaseDao<MetaTableColumnEntity> {
    
    @Select("select * from meta_table_column where meta_table_id=#{metaTableId}")
    List<MetaTableColumnEntity> queryMetaTableColumn(Long metaTableId);
    
    @Delete("delete from meta_table_column where meta_table_id=#{metaTableId}")
    Integer deleteByParentMetaTableId(Long metaTableId);
}
